import request from '@/utils/request'
 

export function listModel(query) {
  return request({
    url: '/flowable/model/list',
    method: 'get',
    params: query
  })
}

export function importModel(parameter) {
  return request({
      url: '/flowable/model/import',
      method: 'post',
      data: parameter
  })
}
export function deployModel(parameter) {
  return request({
      url: '/flowable/model/deploy',
      method: 'post',
      data: parameter
  })
}

export function addModel(parameter) {
  return request({
      url: '/flowable/model/add',
      method: 'post',
      data: parameter
  })
}

export function updateModel(parameter) {
  return request({
      url: '/flowable/model/update',
      method: 'put',
      data: parameter
  })
}

export function saveModelEditor(parameter) {
  return request({
      url: '/flowable/model/saveModelEditor',
      method: 'put',
      data: parameter
  })
}

 

export function deleteModel(ids,caches) {
  return request({
      url: '/flowable/model/delete/'+ids+"/"+caches,
      method: 'delete',
      data: null
  })
}

 

export function getModelById(id) {
  return request({
    url: '/flowable/model/queryById?id=' + id,
    method: 'get'
  })
}
 


